package com.cn.bulu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.cn.bulu.utils.BuluResult;

@Controller
@RequestMapping("/interceptor")
public class InterceptorController {
	@RequestMapping("/login")
	@ResponseBody
	public BuluResult login(){
		BuluResult buluResult=new BuluResult();
		buluResult.setStatus(1);
		buluResult.setMessage("该用户账号没有登录!请登录之后再测试");
		return buluResult;
	}
	
	@RequestMapping("/paramter")
	@ResponseBody
	public BuluResult paramter(){
		BuluResult buluResult=new BuluResult();
		buluResult.setStatus(2);
		buluResult.setMessage("请求参数缺少!!");
		return buluResult;
	}
	@RequestMapping("/overTime")
	@ResponseBody
	public BuluResult overTime(){
		BuluResult buluResult=new BuluResult();
		buluResult.setStatus(3);
		buluResult.setMessage("该请求已经超时");
		return buluResult;
	}
	@RequestMapping("/failreToken")
	@ResponseBody
	public BuluResult failreToken(){
		BuluResult buluResult=new BuluResult();
		buluResult.setStatus(4);
		buluResult.setMessage("令牌错误!");
		return buluResult;
	}
}
